<?php
include_once('../../admin/php/bootstrap.php');
include_once('../../admin/php/clases/class.phpmailer.php');

$contenido .= '<p><strong>Nombre:</strong> '.$_POST['nombre'].'</p>';
$contenido .= '<p><strong>Email:</strong> '.$_POST['email'].'</p>';
$contenido .= '<p><strong>Consulta:</strong><br />'.nl2br(utf8_decode($_POST['mensaje']));

$mail = new phpmailer();
$mail->IsSMTP();
$mail->SMTPDebug  = 2;
$mail->PluginDir = 'include/';
$mail->Mailer = "smtp";
$mail->Host = "smtp.googlemail.com";
$mail->SMTPAuth = true;
$mail->SMTPSecure = "ssl";
$mail->Port = 465;
$mail->Username = 'info@estudiofuseo.com'; 
$mail->Password = "estudiofuseo.2012";
$mail->IsHTML(true);
$mail->From = "info@estudiofuseo.com";
$mail->FromName = "Consultas online";
$mail->Timeout=30;
$mail->AddAddress('maxi@greentomato.com.ar');
//$mail->AddAddress('info@estudiofuseo.com');
$mail->IsHTML(true);
$mail->Subject = 'Consultas online';
$mail->Body = $contenido;
$exito = $mail->Send();

$intento=1; 
while ((!$exito) && ($intento <= 2)) {
    sleep(3);
    $exito = $mail->Send();
    $intento++;	
}
echo($mail->ErrorInfo);
?>